package com.ht.temp.mapper;

import com.ht.temp.entity.DayReport;
import com.ht.temp.entity.MonthReport;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ht.temp.entity.YearReport;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author mayke_zhou
 * @since 2018-12-24
 */
@Repository
public interface MonthReportMapper extends BaseMapper<MonthReport> {
    //删除
    int deleteByPrimaryKey(Integer monthId);

    //插入
    int insertSelective(MonthReport record);

    //查询报表单次
    MonthReport selectByPrimaryKey(Integer monthId);

    //查询天报表某一月之前一月的天平均数据
    public List<MonthReport> selectMonthReportByYear(@Param("nowTime") String nowTime, @Param("afterTime") String afterTime, @Param("deviceId") Integer deviceId);

    //查询月报表
    List<MonthReport> selectByMonthReport(MonthReport report);

    //根据天报表查询月报表
    List<DayReport> selectByDayReport();

    //按年查询报表信息
    List<MonthReport> selectYearReport(@Param("searchYear")String searchYear,@Param("deviceId") Integer deviceId);
}
